Scripting > CxHmiRsm > CxRsmEditor Object > CxRsmEditor Methods

CxRsmEditor Methods

The CxRsmEditor object contains the following methods:

Configure

The Configure method launches a Properties dialog box for the connected RSM service.

Syntax

Configure()

Example

The following example launches a Properties dialog box using Configure().

Sub

 

CxRsmEditor.Configure

 

End Sub

Back to top

Connect

The Connect method connects to the specified RSM service.

Syntax

Connect(SiteService As String)

Parameters

Parameter Required Description

SiteService

Yes

The RSM Site.Service to which you wish to connect.

Example

The following example connects to CYGDEMO.RSM.

Sub

 

Dim CxRsmEditor

Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor")

CxRsmEditor.Connect("CYGDEMO.RSM")

 

End Sub

Back to top

ControlService

The ControlService method starts, stops, or kills the specified service.

Syntax

ControlService(SiteService As String, Command As Unsigned Short) As Short

Parameters

Parameter Required Description

SiteService

Yes

The Site.Service to control.

Note: This service must be an entry in the RSM to which you have connected using Connect().

Command

Yes

The command to send to the service.

Possible values are as follows.

  • 1 — Start service
  • 2 — Stop service
  • 3 — Kill service

Remark

A nonzero return value indicates an error controlling the service.

Example

The following example connects to CYGDEMO.RSM.

Sub

 

Dim CxRsmEditor

Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor")

CxRsmEditor.Connect("CYGDEMO.RSM")

CxRsmEditor.ControlService "CYGDEMO.UIS", 1

 

End Sub

Back to top

Delete

The Delete method deletes the specified service.

Syntax

Delete(SiteService As String) As Short

Parameters

Parameter Required Description

SiteService

Yes

The Site.Service to delete.

Note: This service must be an entry in the RSM to which you have connected using Connect().

Remark

A nonzero return value indicates an error deleting the service.

Example

The following example deletes the CYGDEMO.OPCIS service.

Sub

 

CxRsmEditor.Delete("CYGDEMO.OPCIS")

 

End Sub

Back to top

Disconnect

The Disconnect method disconnects from the specified RSM service.

Syntax

Disconnect()

Example

The following example disconnects from CYGDEMO.RSM.

Sub

 

Dim CxRsmEditor

Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor")

CxRsmEditor.Connect("CYGDEMO.RSM")

 

CxRsmEditor.Disconnect

 

End Sub

Back to top

New

The New method launches a New RSM Entry dialog box for the connected RSM service.

Syntax

New(SiteService As String) As Short

Parameters

Parameter Required Description

SiteService

Yes

The Site.Service returned by this method. This value is the new Site.Service name specified in the "Service Name" edit box of the New RSM Entry dialog box.

Remark

A nonzero return value indicates an error creating a new service.

Example

The following example launches the New RSM Entry dialog box and presents the re:

Sub

 

Dim strSiteService

CxRsmEditor.New(strSiteService)

 

MsgBox strSiteService

 

End Sub

Back to top

Properties

The Properties method invokes a Properties dialog box for the selected service(s) if the properties function is enabled.

Syntax

Properties(SiteService As String) As Short

Parameters

Parameter Required Description

SiteService

Yes

The Site.Service for which to display properties.

Note: This service must be an entry in the RSM to which you have connected using Connect().

Remark

A nonzero return value indicates an error displaying the properties.

Example

The following example launches a Properties dialog box for the CYGDEMO.PNT service.

Sub

 

CxRsmEditor.Properties("CYGDEMO.PNT")

 

End Sub

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.